import { createRouter, createWebHistory } from "vue-router";

export const router = createRouter({
  history: createWebHistory(),
  routes:[
    {
      path: '/',
      redirect: '/props'
    },
    {
      path: '/props',
      name: 'props',
      component: () => import('@/pages/01_props/01_props.vue')
    },
    {
      path: '/custom',
      name: 'custom',
      component: () => import('@/pages/02_custom-event/02_custom-event.vue')
    },
    {
      path: '/mitt',
      name: 'mitt',
      component: () => import('@/pages/03_mitt/03_mitt.vue')
    },
    {
      path: '/model',
      name: 'model',
      component: () => import('@/pages/04_v-model/04_v-model.vue')
    },
    {
      path: '/attr',
      name: 'attr',
      component: () => import('@/pages/05_$attr/05_attr.vue')
    },
    {
      path: '/refs',
      name: 'refs',
      component: () => import('@/pages/06_$refs-$parent/06_$refs-$parent.vue')
    },
    {
      path: '/provide',
      name: 'provide',
      component: () => import('@/pages/07_provide和inject/07_provide和inject.vue')
    },
    {
      path: '/slot',
      name: 'slot',
      component: () => import('@/pages/09_slot默认插槽/father.vue')
    },
    {
      path: '/slot2',
      name: 'slot2',
      component: () => import('@/pages/09_slot具名插槽/father.vue')
    },
    {
      path: '/slot3',
      name: 'slot3',
      component: () => import('@/pages/09_slot作用域插槽/father.vue')
    }
  ]
})




